/*
 * Copyright © 2004-2014 chenYuan. All rights reserved.
 * @Website:wwww.jspx.net
 * @Mail:39793751@qq.com
 * @author: chenYuan , 陈原
 * @License: Jspx.net Framework Code is open source (LGPL)，Jspx.net Framework 使用LGPL 开源授权协议发布。
 * @jvm:jdk1.6+  x86/amd64
 *
 */
package com.jspx.sioc.tag;

import com.jspx.scriptmark.core.TagNode;
import com.jspx.utils.StringUtil;
import com.jspx.utils.XMLUtil;
import org.xml.sax.SAXException;

import java.io.IOException;

/**
 * Created by IntelliJ IDEA.
 * User: chenYuan
 * Date: 12-1-4
 * Time: 下午12:08
 *
 */
public abstract class IocTagNode extends TagNode {

    public final static String key_name = "name";

    public String getId() throws Exception
    {
        String name = getAttribute(key_name);
        if (!StringUtil.hasLength(name)) name = getAttribute("id");
        return XMLUtil.deleteQuote(name);
    }

}